package com.dd.cloud.user.service.goods;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dd.cloud.user.entity.goods.ConversionGood;
import com.dd.cloud.user.entity.goods.GoodsExchange;
import com.dd.cloud.user.req.goods.ConversionGoodReq;
import com.dd.cloud.user.req.goods.GoodsExchangeAddFrom;
import com.dd.cloud.user.req.goods.GoodsExchangeReq;
import com.dd.cloud.user.req.goods.GoodsExchangeUpdateFrom;

import java.util.Map;

/**
 * <p>
 * 商品积分兑换表 服务类
 * </p>
 *
 * @author czg
 * @since 2024-01-17
 */
public interface IGoodsExchangeService extends IService<GoodsExchange> {

    /**
     * 查询商品列表
     *
     * @param req
     * @return
     */
    Page<GoodsExchange> queryGoodsExchangePage(GoodsExchangeReq req);

    /**
     * 添加商品
     *
     * @param from
     * @deprecated
     */
    void addGoodsExchange(GoodsExchangeAddFrom from);

    /**
     * 编辑商品
     *
     * @param from
     */
    void updateGoodsExchange(GoodsExchangeUpdateFrom from);

    /**
     * 修改商品的状态
     *
     * @param status
     * @param goodId
     */
    void updateGoodsExchangeStatus(Integer goodId, Integer status);


    /**
     * 查询商品详情
     *
     * @param goodId 商品id
     * @return
     */
    GoodsExchange queryGoodsExchangeDetail(Integer goodId);

    /**
     * 修改上下架
     *
     * @param goodId
     * @param isShow
     * @deprecated
     */
    void updateGoodsExchangeIsShow(Integer goodId, Integer isShow);

    /**
     * 上下移动
     *
     * @param goodId
     * @[param flag
     * @deprecated
     */
    void moveGoodsExchange(Integer goodId, Integer flag);

    /**
     * 商品兑换
     *
     * @param goodId
     * @param num
     * @param phone
     */
    Map<Integer,String> exchangeDoctorGoods(Integer goodId, Integer num, String phone);

    /**
     * 查询商品列表
     * @param req
     * @return
     */
    Page<GoodsExchange> queryDoctorGoodsPage(GoodsExchangeReq req);

}
